from django.test import TestCase

# Create your tests here.


import requests


url = 'https://haokan.baidu.com/v?vid=5771635970949894701&pd=bjh&fr=bjhauthor&type=video'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36',
    'cookie': 'BAIDUID=8E20657B9568B3A9C32602A17D41FF98:FG=1; BIDUPSID=8E20657B9568B3A9C32602A17D41FF98; PSTM=1572357988; BDUSS=nQxbnhCUHlOdWtRS0VKRi1pQnhVLTdnbWxKaHhOcmVsTENqLU9EQzJOfnJMcTVlSVFBQUFBJCQAAAAAAAAAAAEAAACdI~tWQUvN-wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOuhhl7roYZef; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; H_PS_PSSID=; BDRCVFR[vYPBpHTdsfb]=dO4puMDy_impHNVmyb8mvqV; delPer=0; PSINO=3; yjs_js_security_passport=a2328dfbce2b9a72ae35016dd69907212bbd4255_1587472015_js; Hm_lvt_4aadd610dfd2f5972f1efee2653a2bc5=1586780469,1587521219; Hm_lvt_407473d433e871de861cf818aa1405a1=1586780475,1587521226; COMMON_LID=2859ab315abc1538ee98376433bfd941; Hm_lpvt_4aadd610dfd2f5972f1efee2653a2bc5=1587525519; reptileData=%7B%22data%22%3A%22af7dea146a8e155156af8127666d42a1d219d02055bfcf5da5d8725f4b079ca793d6c342b2d2c4bc3a75f5e98a5236d2238c91878f33c6b4a647cb747e9e0754fd8967127dc07070b4a4a3e7eed3a7a0e7f789c6f7b7cda4f2ff679026beb166f19a27c0df7f98683ca8a433c4e89aaccb4451d54a8e527f70cf3caf3fe2066b%22%2C%22key_id%22%3A%2230%22%2C%22sign%22%3A%22426df01f%22%7D; Hm_lpvt_407473d433e871de861cf818aa1405a1=1587525526; PC_TAB_LOG=haokan_website_page'

}

res = requests.get(url, headers)
# res.encoding = res.apparent_encoding
print(res.json())